﻿using Bigway.Common.Models.DbModels;

namespace Bigway.Common.Services.Repositories;

public interface IBaseCodeNameEntityRepository<TEntity>
    : IBaseRepository<TEntity>
    where TEntity : BaseCodeNameEntity
{
    Task InitializeAllAsync(CancellationToken token = default);

    Task<List<TEntity>> GetAllAsync(
        string systemId,
        string? code = null,
        CancellationToken token = default);

    Task<TEntity?> GetAsync(string systemId, string code, CancellationToken token = default);
}